<template>
  <a-card class="info" title="立项信息">
    <template slot="extra">
<!--      <a-button-->
<!--          class="ruleButton"-->
<!--          :ghost="true"-->
<!--          type="primary"-->
<!--          icon="edit"-->
<!--          @click="handleEdit(model)"-->
<!--          :disabled="isDisabledAuth('erpOmcProject:edit')"-->
<!--      />-->
    </template>
    <a-row type="flex" justify="center">
      <a-col :span="24">
        <erp-omc-project-form ref="realForm" :disabled="true" normal :isDetailButton="true"></erp-omc-project-form>
      </a-col>
    </a-row>
    <erp-omc-project-modal ref="modalForm" @ok="modalFormOk"></erp-omc-project-modal>
    <a-row>
      <a-tabs default-active-key="1">
      </a-tabs>
    </a-row>
  </a-card>
</template>

<script>

import { getAction } from '@/api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ErpOmcProjectForm from './modules/ErpOmcProjectForm'
import ErpOmcProjectModal from './modules/ErpOmcProjectModal'
import { DisabledAuthFilterMixin } from '@/mixins/DisabledAuthFilterMixin'

export default {
  name: 'ErpOmcProjectDetail',
  mixins: [JeecgListMixin, DisabledAuthFilterMixin],
  components: {
    ErpOmcProjectForm,
    ErpOmcProjectModal,
  },
  data() {
    return {
      model: {},
      id: '',
      url: {
        queryById: '/api/erp/omc/project/erpOmcProject/queryById',
        delete: '/api/erp/omc/project/erpOmcProject/delete',
      },
      confirmLoading: false,
      iconStyle: { 'font-size': '20px' },
    }
  },
  created() {
  },
  watch: {
    $route(to, from) {
      this.loadData();
    },
  },
  mounted() {
  },
  methods: {
    loadData() {
      const id = this.$route.params.id;
      getAction(this.url.queryById, { id }).then((res) => {
        if (res.success) {
          const model = res.result
          this.$refs.realForm.edit(model);
          this.model = model;
        }
      })
    },
  }
}
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';

.info {
  /deep/ .ant-card-head-title {
    flex: none;
    margin-right: 20px;
  }

  /deep/ .ant-card-extra {
    flex: 1;
    float: left;
  }
}
</style>
